using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class SacculuMap : EntityTypeConfiguration<Sacculu>
    {
        public SacculuMap()
        {
            // Primary Key
            this.HasKey(t => t.Sacculus_ID);

            // Properties
            this.Property(t => t.Sacculus_Name)
                .HasMaxLength(20);

            this.Property(t => t.HospitalId)
                .HasMaxLength(20);

            // Table & Column Mappings
            this.ToTable("Sacculus");
            this.Property(t => t.Sacculus_ID).HasColumnName("Sacculus_ID");
            this.Property(t => t.Sacculus_Name).HasColumnName("Sacculus_Name");
            this.Property(t => t.HospitalId).HasColumnName("HospitalId");
            this.Property(t => t.create_time).HasColumnName("create_time");
            this.Property(t => t.State).HasColumnName("State");
        }
    }
}
